<template>
    <div>
      <el-row class="lock-btn">
        <el-input v-model="queryParams.faultNo" style="width:200px;float: left;margin-left:5px;" clearable placeholder="请输入工单号"></el-input>
        <el-input v-model="queryParams.lockMac" style="width:200px;float: left;margin-left:5px;" clearable placeholder="请输入编号"></el-input>
        <el-input v-model="queryParams.lockName" style="width:200px;float: left;margin-left:5px;" clearable placeholder="请输入站点名称"></el-input>
        <!-- <el-select style="width:200px;margin-left:5px;" v-model="queryParams.faultSource" placeholder="选择问题来源">
            <el-option key="0" label="全部" :value="99"></el-option>
            <el-option key="1" label="主动上报" :value="0"></el-option>
            <el-option key="2" label="人工巡检" :value="1"></el-option>
            <el-option key="3" label="用户反馈" :value="2"></el-option>
            <el-option key="4" label="其他" :value="3"></el-option>
          </el-select> -->
        
          <el-input v-model="queryParams.faultDesc" style="width:200px;float: left;margin-left:5px;" clearable placeholder="请输入问题描述"></el-input>


      </el-row>
        <el-row style="margin-left:5px;margin-bottom:15px;margin-top:10px">
          <el-col>
           
        <el-select style="width:200px;" v-model="queryParams.procRate" placeholder="选择进程">
            <el-option key="0" label="全部" :value = "99"></el-option>
            <el-option key="1" label="未处理" :value="0"></el-option>
            <el-option key="2" label="已处理不上报" :value="1"></el-option>
            <el-option key="3" label="已处理并上报" :value="2"></el-option>
            <el-option key="4" label="上报未维修" :value="3"></el-option>
            <el-option key="5" label="已维修" :value="4"></el-option>
          </el-select>
        <el-select style="width:200px;" v-model="queryParams.isReport" placeholder="选择是否上报">
            <el-option key="0" label="全部" :value = "99"></el-option>
            <el-option key="1" label="未上报" :value="0"></el-option>
            <el-option key="2" label="已上报" :value="1"></el-option>
          </el-select>
          <el-select style="width:200px;" v-model="queryParams.isRead" placeholder="选择是否已读">
            <el-option key="0" label="全部" :value = "99"></el-option>
            <el-option key="1" label="是" :value="0"></el-option>
            <el-option key="2" label="否" :value="1"></el-option>
          </el-select>
          <el-button size="medium" type="primary" @click="queryBtn" round>搜索</el-button>
          <el-button size="medium" type="danger" round @click="batchDelete">批量处理</el-button>

  
      </el-col>
      </el-row>
      <el-row style="box-shadow: rgb(205 205 205) 1px 1px 8px;">
        <el-col :span="24">
          <el-table :header-cell-style="{ background: '#ecf3fd',color:'#000000' }" highlight-current-row  ref="lcredepositrequestTable" v-loading="loading" :data="list" :stripe="true" :row-key="'id'" :max-height="clientHeight" :height="clientHeight" @selection-change="handleTableChange">
            <el-table-column type="selection" :reserve-selection="true" width="55" fixed></el-table-column>

            <el-table-column prop="lockMac" label="编号" width="150" sortable align="center">
            </el-table-column>
            <el-table-column prop="lockName" label="站点名称" width="130" sortable align="center">
            </el-table-column>
                
            <el-table-column prop="faultDesc" label="问题描述" width="280" align="left">
            </el-table-column>
            <el-table-column prop="procRate" label="进程" width="120" align="center">
              <template slot-scope="{ row }">
              <el-tag
            v-if="row.procRate == 0"
            size="medium"
            type="danger"
            effect="dark"
            style="font-size: 14px"
            >未处理</el-tag
          >
          <el-tag
            v-else-if="row.procRate == 1"
            size="medium"
            type="warning"
            effect="dark"
            style="font-size: 14px">已处理不上报</el-tag>
          <el-tag
            v-else-if="row.procRate == 2"
            size="medium"
            type="primary"
            effect="dark"
            style="font-size: 14px">已处理并上报</el-tag>
          <el-tag
            v-else-if="row.procRate ==3"
            size="medium"
            type="info"
            effect="dark"
            style="font-size: 14px"
            >上报未维修</el-tag>
          <el-tag
            v-else-if="row.procRate ==4"
            size="medium"
            type="success"
            effect="dark"
            style="font-size:14px"
            >已维修</el-tag>
          <el-tag v-else size="medium" type="Info" style="font-size: 14px">{{row.procRate}}</el-tag>
          </template>
            </el-table-column>
            
            <el-table-column prop="opPerson" label="上报人员" width="180" align="center">
            </el-table-column>

            <el-table-column prop="procMethod" label="解决方案" width="200" align="center">
            </el-table-column>
            
           
            <el-table-column prop="isReport" label="是否上报" width="180" align="center">
              <template slot-scope="{ row }">
          <el-tag
            v-if="row.isReport == 0"
            size="medium"
            type="danger"
            effect="dark"
            style="font-size: 14px"
            >未上报</el-tag
          >
          <el-tag
            v-else-if="row.isReport == 1"
            size="medium"
            type="success"
            effect="dark"
            style="font-size: 14px"
            >已上报</el-tag
          >
          <el-tag v-else size="medium" type="Info" style="font-size: 14px">{{
            row.isReport}}</el-tag>
           </template>
            </el-table-column> 
            <el-table-column prop="createDate" label="创建时间" width="100" align="center">
            </el-table-column>

            <el-table-column prop="reportDate" label="处理日期" width="180" align="center">
            </el-table-column>

            <el-table-column prop="faultNo" label="工单号" width="240" align="center">
            </el-table-column>  

            <el-table-column prop="faultSource" label="问题来源" width="120" align="center">
              <template slot-scope="{ row }">
              <el-tag
            v-if="row.faultSource == 0"
            size="medium"
            type="success"
            effect="dark"
            style="font-size: 14px"
            >主动上报</el-tag
          >
          <el-tag
            v-else-if="row.faultSource == 1"
            size="medium"
            type="warning"
            effect="dark"
            style="font-size: 14px"
            >人工巡检</el-tag
          >
          <el-tag
            v-else-if="row.faultSource == 2"
            size="medium"
            type="primary"
            effect="dark"
            style="font-size: 14px"
            >用户反馈</el-tag
          >
          <el-tag
            v-else-if="row.faultSource == 3"
            size="medium"
            type="info"
            effect="dark"
            style="font-size: 14px"
            >其他</el-tag
          >
          <el-tag v-else size="medium" type="Info" style="font-size: 14px">{{
            row.faultSource
          }}</el-tag>
          </template>
            </el-table-column>
            <!-- <el-table-column prop="isRead" label="是否已读" width="80" align="center">
             
              <template slot-scope="scope"> 
    
          <el-tag
            v-if="scope.row.isRead == true"
            size="medium"
            type="success"
            effect="dark"
            style="font-size: 14px"
            >已读</el-tag>
          <el-tag
            v-else-if="scope.row.isRead == false"
            size="medium"
            type="warning"
            @click="checkIsRead(scope.$index, scope.row)"
            effect="dark"
            style="font-size: 14px;cursor: pointer;"
            >未读</el-tag>
          <el-tag v-else size="medium" type="Info" style="font-size: 14px">无</el-tag>
        </template>
            </el-table-column> -->
          
           
      <!-- <el-table-column fixed="right" prop="" label="操作" width="120" align="center">
       <template slot-scope="scope">
     
            <el-button
                size="mini"
                type="primary"
                @click="editBtn(scope.$index, scope.row)"
                title="处理"
                >上报处理</el-button
              >
          </template>
            </el-table-column> -->

            <el-table-column fixed="right" label="操作" width="" align="center">
                <template slot-scope="scope">

                  <el-tag
                v-if="scope.row.procRate == 2"
                size="medium"
                type="info"
                effect="dark"
               
                >处理</el-tag>
              <el-tag
                v-else
                size="medium"
                type="success"
                effect="dark"
                style="cursor:pointer"
                @click="editBtn(scope.$index, scope.row)"
                >处理</el-tag>
 
            </template>
          </el-table-column>
           
          
          </el-table>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24" class="page-tool">
          <el-pagination layout="total,sizes,prev, pager,next,jumper" :page-size="pageSize" :total="total" :page-sizes="[10, 20, 30, 40, 100]" @size-change="handlePageChange" @current-change="handleNoChange">
          </el-pagination>
        </el-col>
      </el-row>



      

     <el-dialog
      title="设备处理"
      :visible.sync="addDialog3"
      :width="'800px'"
      :destroy-on-close="true"
    >
      <el-form :rules="rules" :model="feeForm" ref="feeForm">


        <el-row>
          <el-col span="11">
            <el-form-item label="工单号" :label-width="labelWidth" prop="faultNo">
              <el-input
                v-model="feeForm.faultNo"
                disabled
                auto-complete="off"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>


        <el-row>
          <el-col span="11">
            <el-form-item label="mac" :label-width="labelWidth" prop="lockMac">
              <el-input
                v-model="feeForm.lockMac"
                disabled
                auto-complete="off"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col span="12">
            <el-form-item
              label="站点名称"
              :label-width="labelWidth"
              prop="lockName"
            >
              <el-input
                v-model="feeForm.lockName"
                disabled
                auto-complete="off"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col span="18">
            <el-form-item
              label="问题描述"
              :label-width="labelWidth"
              prop="faultDesc"
            >
        
            <el-select v-model="feeForm.faultDesc" placeholder="请选择问题类型" >
                <el-option key="0" label="设备离线" :value="0"></el-option>
                <el-option key="1" label="设备掉电" :value="1"></el-option>
                <el-option key="2" label="起落异常" :value="2"></el-option>
                <el-option key="3" label="充电异常" :value="3"></el-option>
                <el-option key="4" label="部件损坏" :value="4"></el-option>
                <!-- <el-option key="5" label="其他" :value="5"></el-option> -->
              </el-select>
              
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col span="18">
            <el-form-item
              label="拟解决方案"
              :label-width="labelWidth"
              prop="procMethod"
            >

            <el-select v-model="feeForm.procMethod" placeholder="请选择解决方案" >
                <el-option key="0" label="现场排查" :value="0"></el-option>
                <el-option key="1" label="断电重启" :value="1"></el-option>
                <el-option key="2" label="检查通讯模块" :value="2"></el-option>
                <el-option key="3" label="更换电路板" :value="3"></el-option>
                <el-option key="4" label="更换枪线" :value="4"></el-option>
                <el-option key="5" label="钣金修复" :value="5"></el-option>
                <el-option key="6" label="更换雷达" :value="6"></el-option>
                <el-option key="7" label="更换部件" :value="7"></el-option>
                <el-option key="8" label="更换电路控制板" :value="8"></el-option>
                <el-option key="9" label="更换开关电源" :value="10"></el-option>
                <el-option key="10" label="更换电机控制器" :value="10"></el-option>
                <el-option key="11" label="更换空开" :value="11"></el-option>
                <el-option key="12" label="更换急停" :value="12"></el-option>
                <el-option key="13" label="更换电表" :value="13"></el-option>
                <el-option key="14" label="自动恢复" :value="14"></el-option>
                <el-option key="15" label="人工处理" :value="15"></el-option>
                <!-- <el-option key="16" label="其他" :value="16"></el-option> -->
              </el-select>
               
            </el-form-item>
          </el-col>


        </el-row>


        <el-row>
          <el-col span="12">
            <el-form-item label="是否上报" :label-width="labelWidth" prop="isReport">
       <el-checkbox
        style="margin-left: 30px"
        v-model="checked"
        @change="checkValue"
        >上报</el-checkbox>
            </el-form-item>
          </el-col>
          <!-- <el-col span="12">
            <el-form-item label="问题来源" :label-width="labelWidth" prop="faultSource">
              <el-select v-model="feeForm.faultSource" placeholder="请选择">
                <el-option key="0" label="主动上报" :value="0"></el-option>
                <el-option key="1" label="人工巡检" :value="1"></el-option>
                <el-option key="2" label="用户反馈" :value="2"></el-option>
                <el-option key="3" label="其他" :value="3"></el-option>
              </el-select>
            </el-form-item>
          </el-col> -->

        </el-row>
        <!-- <el-row>
        <el-col span="12" v-if="feeForm.isReport">
          <el-form-item
              label="推送人员"
              :label-width="labelWidth"
              prop="opPerson"
            >
 
             <el-select  style="margin-left: 5px;
              width: 252px;"  v-model="feeForm.opPerson" filterable placeholder="请选择推送人员"> 
   
            <el-option disabled
            v-for="item in opPersonList"
            :key="item[0]"
            :label="item[1]"
            :value="item[0]+','+item[1]">
          </el-option>
         </el-select>  
            </el-form-item>
          </el-col>
 
        </el-row> -->

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancle3">取消</el-button>
        <el-button type="primary" @click="Channelcheck3">处理</el-button>
      </div>
    </el-dialog>
  



    <el-dialog
      title="批量处理"
      :visible.sync="addDialog4"
      :width="'800px'"
      :destroy-on-close="true"
    >
      <el-form :rules="rules" :model="feeForm" ref="feeForm">

        <el-row>
          <el-col span="18">
            <el-form-item
              label="问题描述"
              :label-width="labelWidth"
              prop="faultDesc"
            >
            <el-input
                type="textarea"
                :rows="5"
                placeholder="请输入内容"
                v-model="feeForm2.faultDesc">
              </el-input>
              
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col span="18">
            <el-form-item
              label="拟解决方案"
              :label-width="labelWidth"
            >
              <el-input
              type="textarea"
                :autosize="{ minRows: 5, maxRows: 5}"
                placeholder="请输入内容"
                v-model="feeForm2.procMethod"
                auto-complete="off"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>


      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="addDialog4 = false">取消</el-button>
        <el-button type="primary" @click="Channelcheck4">批量处理</el-button>
      </div>
    </el-dialog>
  



  
  </div>
  </template>
  
  <script>
   
  import { getNickName, getTestUserName,getRoleCode } from "../../util/auth";
  import { deviceErrorApi,isReadApi } from "../../api/oplog.js";
  import {loadOpPersonListApi,lcfaultprocApi,lcfaultprocPutApi} from '../../api/lockManager';
  
  export default {
    name: "oplog",
    data: function () {
      return {
        clientHeight:
          Math.max(
            document.documentElement.scrollHeight,
            document.body.scrollHeight
          ) -
          132 -
          5 +
          10 -
          28,
        labelWidth: "100px",
        loading: false,
        dialogTitle: "",
        addDialog4:false,
        pageNo: 1,
        pageSize:20,
        statusOptions:['一步运维','管理员运维平台','运营商管理平台'],
        statusOptions2:['设备操作','规格修改'],
        total: 0,
        multipleSelection: [],
        lcredepositrequests: [],
        form: {
          
        },
        opPersonList:[],
        roleCode:'',
        queryParams:{
          faultNo:'',
          lockMac:'',
          lockName:'',
          faultSource:'',
          procRate:'',
          isReport:'',
          isRead:'',
          faultDesc:''
        },
        checked:false,
        addDialog3:false,
        feeForm:{
          faultNo:'',
          lockMac:'',
          lockName:'',
          faultDesc:'',
          procMethod:'',
          faultSource:'',
          isReport:false,
          opPerson:'',
          procRate:''
        },
        feeForm2:{
          faultDesc:'',
          procMethod:''
        },
        addDialog:false,
        parkfieldList: [],
        parkfieldId: '',
        status: '',
  
      };
    },
    methods: {
      editBtn (index, row) {
        let _this = this;
       
        // <router-link to="/index/runInfo">
        
        // </router-link>
        _this.checked = false;
        _this.feeForm.isReport = false;
        _this.feeForm = row;
        _this.loadPerson(row.lockMac);
        _this.addDialog3 = true;
      },
      cancle3(){
      let _this = this;
      _this.addDialog3 = false;
     
    },

    Channelcheck3() {
      var _this = this;

      console.log(_this.feeForm);

      if(_this.feeForm.isReport == true &&  _this.feeForm.procMethod == null){
        console.log("999999999",_this.feeForm.procMethod)
        this.$alert('选择上报后必须输入拟解决方案！', '提示', {
                      confirmButtonText: '确定',});
                      return false

      }

      var faultDesc = _this.feeForm.faultDesc;

      if(_this.feeForm.faultDesc == "0"){

         faultDesc = "设备离线";

      }else if(_this.feeForm.faultDesc == "1"){
  
        faultDesc = "设备断电";

      }else if(_this.feeForm.faultDesc == "2"){
  
        faultDesc = "起落异常";

      }else if(_this.feeForm.faultDesc == "3"){
  
          faultDesc = "充电异常";

        }else if(_this.feeForm.faultDesc == "4"){
  
        faultDesc = "部件损坏";

      }
      // else  if(_this.feeForm.faultDesc == "5"){
      //   faultDesc = "其他";
      // }

      var procMethod = _this.feeForm.procMethod;

      if(_this.feeForm.procMethod == "0"){
        
         procMethod = "现场排查";

      }else if(_this.feeForm.procMethod == "1"){

        procMethod = "断电重启";

      }else if(_this.feeForm.procMethod == "2"){

        procMethod = "插拔通讯模块";
        
      }else if(_this.feeForm.procMethod == "3"){

        procMethod = "更换电路板";

        }else if(_this.feeForm.procMethod == "4"){

        procMethod = "更换枪线";

        }else if(_this.feeForm.procMethod == "5"){

        procMethod = "钣金修复";

        }else if(_this.feeForm.procMethod == "6"){

          procMethod = "更换雷达";

          }else if(_this.feeForm.procMethod == "7"){

          procMethod = "更换部件";

          }else if(_this.feeForm.procMethod == "8"){

            procMethod = "更换电路控制板";

            }else if(_this.feeForm.procMethod == "9"){

                 procMethod = "更换开关电源";

            }else if(_this.feeForm.procMethod == "10"){

              procMethod = "更换电机控制器";

            }else if(_this.feeForm.procMethod == "11"){

              procMethod = "更换空开";

            }else if(_this.feeForm.procMethod == "12"){

              procMethod = "更换急停";

              }else if(_this.feeForm.procMethod == "13"){

              procMethod = "更换电表";

              }else  if(_this.feeForm.procMethod == "14"){

                procMethod = "自动恢复";

              }else  if(_this.feeForm.procMethod == "15"){

               procMethod = "人工处理";

              }
              // else  if(_this.feeForm.procMethod == "16"){

              //   procMethod = "其他";

              //   }

              // console.log(faultDesc);

              
              if(faultDesc != "设备离线" &&  faultDesc != "设备断电" && faultDesc != "起落异常" && faultDesc != "充电异常" && faultDesc != "部件损坏"){

                  _this.$notify({
                  title: "错误提示",
                  message: "故障信息描述错误",
                  type: "success"
                  });

                  return;

                }
                

      const data = {
        faultNo:_this.feeForm.faultNo,
        lockMac:_this.feeForm.lockMac,
        lockName:_this.feeForm.lockName,
        faultDesc: faultDesc,
        procMethod: procMethod,
        faultSource:_this.feeForm.faultSource,
        isReport:_this.feeForm.isReport == false ? 0 : 1,
        opPerson:_this.feeForm.opPerson,
      };

  
    _this.$refs.feeForm.validate((valid) => {
        if (valid) {
  
     lcfaultprocApi(data).then(function (resp) {
          if (resp.errmsg === "ok") {
            _this.$notify({
              title: "成功",
              message: "修改成功",
              type: "success",
            });
            _this.addDialog3 = false;
            
            _this.queryBtn();

          }
        })
        .catch(function (resp) {
          _this.$notify({
            title: "失败",
            message: "修改失败，请稍后重试。",
            type: "error",
          });
        });
        }
      })
      },
      checkIsRead(index, row){
        const data = {
          id: row.id,
          isRead: row.isRead == true ? false : true
        }
        isReadApi(data).then(resp => {
          this.loaddeviceError(this.pageNo, this.pageSize);
        })
       
      },
      checkValue(e){
          var _this = this
          if(e == true){
            _this.feeForm.isReport = true
          }else if(e == false){
            _this.feeForm.isReport = false
          }
        },
      procRefund (index, row, status) {
        let _this = this;
        _this.loading = true;
        procRefundApi(row.id, status).then(resp => {
          console.log(resp)
          _this.loadAbnormalOrder(this.pageNo, this.pageSize);
          _this.$notify({
                title: "成功",
                message: "已处理",
                type: "success"
              });
        });
      },



      batchDelete () {
      if (this.multipleSelection.length == 0) {
        this.$message({
          message: "请先选择要处理的设备",
          type: "warning"
        });
        return;
      }
      let _this = this;
      this.$confirm('确认批量处理故障列表', '提示', {
        type: 'warning'
      })
        .then(_ => {


          _this.addDialog4 = true

        })

    },

    Channelcheck4(){

      console.log("1111111111111111111",this.multipleSelection)
      let _this = this;

let ids = new Array();
for (let i = 0; i < _this.multipleSelection.length; i++) {
  ids[i] = _this.multipleSelection[i].id
}
  let data;
  
  data = {
    ids: ids,
    faultDesc: _this.feeForm2.faultDesc,
    procMethod: _this.feeForm2.procMethod
  }



  lcfaultprocPutApi(data).then(function (resp) {
if (resp.errmsg === "ok") {
  _this.$notify({
    title: "成功",
    message: "修改成功",
    type: "success",
  });
  _this.addDialog4 = false;
  
  _this.queryBtn();

}
})
.catch(function (resp) {
_this.$notify({
  title: "失败",
  message: "修改失败，请稍后重试。",
  type: "error",
});
});

      
    },




      handlePageChange (pageSize) {
        this.pageSize = pageSize;
        this.loaddeviceError(this.pageNo, this.pageSize);
      },
      handleNoChange (pageNo) {
        this.pageNo = pageNo;
        this.loaddeviceError(this.pageNo, this.pageSize);
      },
      handleTableChange (val) {
        this.multipleSelection = val;
      },
      loadPerson (lockMac) {
        let _this = this;

        loadOpPersonListApi({roleCode:_this.roleCode,mac:lockMac}).then(function (resp) {
          if (resp.errmsg === "ok") {

            const resdata = resp.data
  
            for(var i in resdata){
         
                resdata[i] = resdata[i].split(";")
                
            }
            console.log("999",resdata)

            _this.opPersonList = resdata;
 
         }
        })
        .catch(function (e) {
  
        });
     },
      
      loaddeviceError (pageNo, pageSize) {
        let _this = this;
        _this.loading = true;
        const data = {
          faultNo:_this.queryParams.faultNo,
          lockMac:_this.queryParams.lockMac,
          lockName:_this.queryParams.lockName,
          faultSource:_this.queryParams.faultSource == "99" ? "" : _this.queryParams.faultSource,
          procRate:_this.queryParams.procRate == "99" ? "" : _this.queryParams.procRate,
          isReport:_this.queryParams.isReport == "99" ? "" : _this.queryParams.isReport,
          isRead:_this.queryParams.isRead == "99" ? "" : _this.queryParams.isRead,
          
          pageNo:_this.pageNo,
          pageSize:_this.pageSize,
      };
        deviceErrorApi(data).then(resp => {
            if (resp.errmsg === "ok") {
              console.log(resp.data.dataList);
              _this.total = resp.data.totalNum;
              _this.list = resp.data.dataList;
            }
            setTimeout(() => {
            _this.loading = false;
          }, 1 * 1000);
        });
      },
  
      queryBtn () {
        let _this = this;
        _this.loading = true;
        const data = {
          faultNo:_this.queryParams.faultNo,
          lockMac:_this.queryParams.lockMac,
          lockName:_this.queryParams.lockName,
          faultSource:_this.queryParams.faultSource == "99" ? "" : _this.queryParams.faultSource,
          procRate:_this.queryParams.procRate == "99" ? "" : _this.queryParams.procRate,
          isReport:_this.queryParams.isReport == "99" ? "" : _this.queryParams.isReport,
          isRead:_this.queryParams.isRead == "99" ? "" : _this.queryParams.isRead,
          faultDesc:_this.queryParams.faultDesc, 
          procMethod:_this.queryParams.procMethod, 
          pageNo:_this.pageNo,
          pageSize:_this.pageSize,
      };
        deviceErrorApi(data).then(resp => {
          _this.lcredepositrequests = resp.data;
          _this.total = resp.data.totalNum;
          _this.list = resp.data.dataList;
          _this.loading = false;
        });
      }
    },
    computed: {
      userState () {
        return getNickName() === getTestUserName();
      }
    },
    mounted: function () {
      let _this = this;
      _this.roleCode = getRoleCode()
      this.$nextTick(function () {
        this.loaddeviceError(_this.pageNo, _this.pageSize);
      });
    }
  }
  </script>
  
  <style scoped>
  .page-tool {
    background:#dfeaf9;
  }
  
  .page-tool div {
    text-align: right;
  }
  
  .lock-btn {
    margin-bottom: 5px;
    margin-top: -10px;
  }
  .operateBtn {
    font-size: 18px;
    width: 32px;
    height: 32px;
    padding: 0;
  }
  </style>